import { axios } from '@/utils/request'

/**
 * api接口列表
 */
const api = {
  operateBooking: '/erp_meixingtiyu/booking/operateBooking',
  operateList: '/erp_meixingtiyu/booking/operateList',
  bookingList: '/erp_meixingtiyu/booking/bookingList',
  bookingListFilter: '/erp_meixingtiyu/booking/bookingListFilter',
  refund: '/erp_meixingtiyu/booking/refund',
}

/**
 * 后台管理员操作预订
 */
export function operateBooking (params) {
  return axios({
    url: api.operateBooking,
    method: 'post',
    params
  })
}

/**
 * 后台预订操作记录
 */
export function operateList (params) {
  return axios({
    url: api.operateList,
    method: 'get',
    params
  })
}

/**
 * 前台用户预订记录
 */
export function bookingList (params) {
  return axios({
    url: api.bookingList,
    method: 'get',
    params
  })
}

/**
 * 根据日期范围前台用户预订记录
 */
export function bookingListFilter (params) {
  return axios({
    url: api.bookingListFilter,
    method: 'get',
    params
  })
}


export function refund (params) {
  return axios({
    url: api.refund,
    method: 'get',
    params
  })
}